<?php include("header.php"); ?>

<h2><?php echo $thisUser->Username() . "'s Profile"; ?></h2>

<form name="uploadAvatar" action="process_profile_change.php" method="POST" enctype="multipart/form-data">
<table width ="50%" border="0" cellspacing="1" cellpadding="1">
    <tr>
        <td colspan="2"><img src="<?php echo $thisUser->AvatarImage();  ?>" height="60px" width="60px"></img></td>
    </tr>
    <tr>
        <td><label for="avatarFile">File:</label></td>
        <td><input type="file" name="avatarFile" id="avatarFile" /><input type="submit" name="uploadAvatar" id="uploadAvatar" value="Change Avatar"/></td>        
    </tr>
</table>
</form>

<form name="updateUserProfile" action="process_profile_change.php" method="POST">
<table width="60%" border="0" cellspacing="1" cellpadding="1">
    <tr>
        <td><strong>Username</strong></td>
        <td colspan="2"><?php echo $thisUser->Username(); ?></td>
    </tr>
    <tr>
        <td><strong>First Name</strong></td>
        <td><?php echo $thisUser->Firstname(); ?></td>
        <td><input type="text" name="newFirstname" value=""/></td>
    </tr>
    <tr>
        <td><strong>Last Name</strong></td>
        <td><?php echo $thisUser->Lastname(); ?></td>
        <td><input type="text" name="newLastname" value=""/></td>
    </tr>
    <tr>
        <td><strong>Email</strong></td>
        <td><?php echo $thisUser->Email(); ?></td>
        <td><input type="text" name="newEmail" value=""/></td>
    </tr>
    <tr>
        <td><strong>Phone</strong></td>
        <td><?php echo $thisUser->Phone(); ?></td>
        <td><input type="text" name="newPhone" value=""/></td>
    </tr>
    <tr>
        <td align="right" colspan="3"><input type="submit" name="updateProfile" id="updateProfile" value="Update Profile"/></td>
    </tr>
</table>
</form>

<?php include("footer.php"); ?>